ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Tony Water

by evercyan ALL

一个拖泥带水的 sublime-text 插件

Labels json, utils

Details

Installs

  • Total 33
  • Win 15
  • Mac 16
  • Linux 2
Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

How to install?

  • Sublime 插件安装, 搜索 Tony Water
  • MacOS 手动安装
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
git clone https://github.com/evercyan/tony-water

How to use?

  • 编辑区, 右键

tony-water-menu

  • 配置快捷键

具体 commandDefault.sublime-commands


Something else?

将 JSON 字符串翻译成 Golang struct, e.g.

{
    "firstName": "ryan",
    "info": [
        1, 2, "3"
    ],
    "detailInfo": {
        "age": 20,
        "height": "172cm"
    },
    "som":[
        {
            "aaa": 1,
            "bbb": 4
        },
        {
            "bbb": "2",
            "ccc": [
                {
                    "a": [
                        "what"
                    ],
                    "b": {
                        "name": "1"
                    },
                    "c": "c"
                }
            ]
        }
    ]
}
type JSON2Go struct {
    Som []struct {
        Bbb interface{} `json:"bbb"`
        Ccc []struct {
            A []string `json:"a"`
            C string `json:"c"`
            B struct {
                Name string `json:"name"`
            } `json:"b"`
        } `json:"ccc"`
        Aaa int `json:"aaa"`
    } `json:"som"`
    Info []interface{} `json:"info"`
    FirstName string `json:"first_name"`
    DetailInfo struct {
        Height string `json:"height"`
        Age int `json:"age"`
    } `json:"detail_info"`
}